import { IDatatype } from '@/service/types'
import fhupRequest from '../../index'
// 获取数据
export function getPageListData(url: string, queryInfo: any) {
  return fhupRequest.post<IDatatype>({
    url: url,
    data: queryInfo,
    showLoading: false
  })
}
// 删除 url:   -> /users/id
export function deletePageData(url: string) {
  return fhupRequest.delete<IDatatype>({
    url: url
  })
}

// 新建
export function createPageData(url: string, newData: any) {
  return fhupRequest.post<IDatatype>({
    url: url,
    data: newData
  })
}
// 编辑
export function editPageData(url: string, editData: any) {
  return fhupRequest.patch<IDatatype>({
    url: url,
    data: editData
  })
}
